﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Inspector;component/UserInterface/VisualResources/Brushes.xaml" />
    </ResourceDictionary.MergedDictionaries>


    <Style TargetType="Button">
        <Setter Property="Padding" Value="5,0" />
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="MinWidth" Value="90" />
        <Setter Property="Height" Value="24" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Background" Value="{DynamicResource ButtonBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}" />
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <Border x:Name="dropShadowBorder" CornerRadius="3" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" >
                            <Border.Effect>
                                <DropShadowEffect BlurRadius="3" ShadowDepth="1" Opacity="0.2" />
                            </Border.Effect>
                        </Border>
                        <Border CornerRadius="2.8" BorderThickness="1" BorderBrush="#FFFFFFFF" Margin="1">
                            <ContentPresenter TextBlock.Foreground="{DynamicResource DefaultForegroundBrush}" Margin="8,0" x:Name="content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False" >
                            <Setter TargetName="dropShadowBorder" Property="Effect" Value="{x:Null}" />
                            <Setter TargetName="dropShadowBorder" Property="Background" Value="{DynamicResource ButtonDisabledBackgroundBrush}" />
                            <Setter TargetName="dropShadowBorder" Property="Background" Value="{DynamicResource ButtonDisabledBackgroundBrush}" />
                            <Setter TargetName="content" Property="Opacity" Value="0.5" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
           
            <Trigger Property="IsMouseOver" Value="True" >
                <Setter Property="Background" Value="{DynamicResource ButtonHoverBackgroundBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True" >
                <Setter Property="Background" Value="{DynamicResource ButtonPressedBackgroundBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="LinkButtonStyle" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="border" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource DefaultForegroundBrush}" SnapsToDevicePixels="True" VerticalAlignment="Center" >
                        <TextBlock x:Name="content" Text="{TemplateBinding Content}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Cursor"  Value="Hand" />
                            <Setter Property="TextBlock.Foreground" TargetName="content" Value="Black" />
                            <Setter Property="BorderBrush" TargetName="border" Value="Black" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



</ResourceDictionary>